<!--主页面框架包含搜索表单框，表格，分页-->
<template>
  <div>
    <div class="hry-content-wrapper">
      <div class="header">
        <h1>{{ breadcrumbList[breadcrumbList.length - 1].name }}</h1>
        <span @click="$router.go(-1)" v-if="getBackBtn"
          ><a-icon type="rollback" /> 返回</span
        >
      </div>
      <slot></slot>
    </div>
  </div>
</template>

<script>
export default {
  name: "index",
  props: {
    getBackBtn: {
      type: Boolean,
      default: true
    }
  },
  computed: {
    breadcrumbList() {
      return this.$store.state.currentBreadcrumb;
    }
  }
};
</script>

<style scoped lang="less">
h1 {
  font-weight: bold;
  color: #333333;
}
.hry-content-wrapper {
  background: #ffffff;
  padding: 30px 20px;
  .header {
    .flex_content();
    .flex_justify_space();
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px dashed #9c9c9c;
    span {
      color: @primary-color;
      cursor: pointer;
    }
  }
}
</style>
